package com.sunwayworld.basemodule.common.clickhouse.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author jiaorg
 * @date 2022-09-06 17:59
 * @description:数据源初始化
 * @version: 1.0.0
 */
@Component
@ConfigurationProperties(prefix = "clickhouse")
public class ClickHouseConfig {
    public String url;

    public String username;

    public String password;

    public String db;
    public Integer socketTimeout;

    public String cluster;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDb() {
        return db;
    }

    public void setDb(String db) {
        this.db = db;
    }

    public Integer getSocketTimeout() {
        return socketTimeout;
    }

    public void setSocketTimeout(Integer socketTimeout) {
        this.socketTimeout = socketTimeout;
    }

    public String getCluster() {
        return cluster;
    }

    public void setCluster(String cluster) {
        this.cluster = cluster;
    }

    @Override
    public String toString() {
        return "ClickHouseConfig{" +
                "url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", db='" + db + '\'' +
                ", socketTimeout=" + socketTimeout +
                ", cluster='" + cluster + '\'' +
                '}';
    }
}
